
# 如果键存在，代表修改已有键的值
# 如果键不存在，代表新增键值对

# 修改
dict1={"name":"刘备","age":32,"height":1.75}
dict1["name"] = "关羽"
print(dict1)

# 新增
dict1["class"] = "1班"
print(dict1)

# 删除
dict1.pop("height")
print(dict1)


# 得到值
print(dict1["age"])